Skip to content

Conversation

@chamel-shipbob
Copy link

This pr adds the field objectSplit and objectSeperator.
During our use case, I noticed that the plugin formats arrays and dictionaries in a way that is not supportive of a full array or dictionary substitution.
I added objectSplit which defaults to legacy behavior of each item getting its own line
Default Behavior
objectSplit=true, objectSeperator="."
key = {"foo":[0,1,2]}
breakdown into
key.foo.0 = 0
key.foo.1 = 1
key.foo.2 = 2
New Behavior
objectSplit=false, objectSeperator="."
key = {"foo":[0,1,2]}
breakdowns into
key = {"foo":[0,1,2]}

The difference in legacy vs new behavior is how azure handles the substitution
Default Behavior replaces only what is set
New Behavior replaces the entire object
so given the example above and the following appsetting json
key = {"foo":[203],"bar":"hello"}

Default Behavior would become:
key = {"foo":[0],"bar":"hello"} as only key that matches is the 0 index of the foo array(key.foo.0)
New Behavior would replace on the "key" key and become:
key = {"foo":[0,1,2]} as key is the object is "key" and foo.bar does not exist in the "key" object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants